import request from '@/utils/request'
/**
 *
 * 轮播图管理
 *
 **/
// 查询列表接口
export const getCarouselPage = (params: any) => {
  return request({
    url: '/background/carousel/page',
    method: 'get',
    params
  })
}
// 删除接口
export const deleteCarousel = (id: string) => {
  return request({
    url: `/background/carousel/delete/${id}`,
    method: 'post',
    params: { id: id }
  })
}

// 修改接口
export const editCarousel = (params: any) => {
  return request({
    url: '/background/carousel/update',
    method: 'post',
    data: { ...params }
  })
}

// 新增接口
export const addCarousel = (params: any) => {
  return request({
    url: '/background/carousel/add',
    method: 'post',
    data: { ...params }
  })
}

// 查询详情
export const queryCarouselById = (id: string | (string | null)[]) => {
  return request({
    url: `/background/carousel/${id}`,
    method: 'get'
  })
}
